package com.kantboot.business.gc.repository;

import com.kantboot.business.gc.domain.entity.BusGcGameType;
import jakarta.transaction.Transactional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

public interface BusGcGameTypeRepository extends JpaRepository<BusGcGameType, Long> {

    /**
     * 根据游戏id删除游戏类型
     */
    @Modifying
    @Transactional
    @Query("DELETE FROM BusGcGameType WHERE gameId = ?1")
    void deleteByGameId(Long gameId);
}
